      PROGRAM FORTVMS
C*
C*     CONVERT A FORTRAN FORMAT FILE TO A VMS INTERNAL FORMAT FILE...
C*      IE, ONE WITH CARRIAGE CONTROL CHARACTERS.
C*
      CHARACTER *133 LINE
      CHARACTER *1 FF, LF
C
      FF = CHAR(12)
      LF = CHAR(10)
      OPEN(2,CARRIAGECONTROL='LIST',STATUS='NEW')
10    READ(1,900,END=1000)LINE
      LL = LENGTH ( LINE )
      IF (LL .LT. 2)LL = 2
      IF (LINE(1:1) .EQ. '1') THEN
           WRITE(2,901)FF,LINE(2:LL)
      ELSE IF (LINE(1:1) .EQ. '0') THEN
           WRITE(2,901)LF,LINE(2:LL)
      ELSE IF (LINE(1:1) .NE. ' ') THEN
           WRITE(6,904)LINE
           WRITE(2,903)LINE(2:LL)
      ELSE
           WRITE(2,903)LINE(2:LL)
      ENDIF
      GO TO 10
C
1000  STOP
900   FORMAT(A)
901   FORMAT(A,A)
903   FORMAT(A)
904   FORMAT(' *** WARNING, ILLEGAL CHARACTER IN CONTROL FIELD...',
     $ //,'V',/,A)
      END
